<?php
 
$host = 'localhost'; // MYSQL database host adress
$db = 'kir772876_boxwiper'; // MYSQL database name
$user = 'root'; // Mysql Datbase user
$pass = ''; // Mysql Datbase password
 
// Connect to the database
$link = mysql_connect($host, $user, $pass);

mysql_select_db($db);
mysql_query("SET NAMES utf8");
require 'exportcsv.inc.php';
 
        $table="setting_area"; // this is the tablename that you want to export to csv from mysql.
        $password = $_GET['password'];

        $name = $_GET['name'];

        $sql = "SELECT * FROM `admin` WHERE password = '$password' AND username = '$name'";
        
        $query = $this->db->query($sql)->result();

        if ($query) {
            return 1;
            exportMysqlToCsv($table);
            echo 'hello';
        } else {
            echo 'err';
            return 0;

        }

 
?>
